import os
from flask_migrate import Migrate

from .models import Professor, Student, Registrar, Prerequisite, Inputbox, Section, Teaches, Takes, Course, Bill
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_pagedown import PageDown
from .config import config
from .models import Student, Professor, Registrar
from . import db, create_app

app = create_app('default')
migrate = Migrate(app, db)

# @app.shell_context_processor
# def make_shell_context():
#     return dict(db=db, Professor=Professor, Student=Student, Registrar=Registrar, Prerequisite=Prerequisite,
#                 Inputbox=Inputbox, Section=Section, Teaches=Teaches, Takes=Takes, Course=Course, Bill=Bill)


if __name__ == '__main__':
    app.run(threaded=True)
